package com.service.impl;

import com.bean.History;
import com.bean.HistoryList;
import com.dao.HistoryDao;
import com.dao.impl.HistoryDaoImpl;
import com.service.HistoryService;

import java.util.List;

public class HistoryServiceimpl implements HistoryService {

    HistoryDao historyDao = new HistoryDaoImpl();

    //删除全部历史
    @Override
    public int delAll() {
        return historyDao.deleAll();
    }

    //删除历史
    @Override
    public int deleteHIs(Integer id) {
        return historyDao.deleHis(id);
    }

    //添加历史
    @Override
    public int addHIs(History history) {
        return historyDao.addHistory(history);
    }

    //历史记录查询
    @Override
    public List<HistoryList> query(Integer id) {
        return historyDao.queryHistory(id);
    }
}
